import axios from '@/utils/request'

import config from '@/common/config'

let base = config.getArcBasePath();


/**
 * arc_doc_archive
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={docNo:'文档编号 主键',signer:'签发人',archiveId:'公文编号',wordNum:'字号',writtenDate:'成文日期',dispatchDate:'分发日期',draftUserid:'拟稿人',draftUsername:'拟稿人姓名',checkUserid:'核稿人',checkUsername:'核稿人姓名',checkedUserid:'校对人编号',checkedUsername:'校队人姓名',secrecyLevel:'保密级别',urgencyLevel:'紧急程度',topicName:'主题词',docTitle:'标题',docFlowState:'流程状态',docProcInstId:'流程实例编号',docYmd:'文档年月日yyyyMMdd',wordName:'字名',docYear:'档案年度'}
 **/

//普通查询 条件之间and关系  
export const listDocArchive = params => { return axios.get(`${base}/mdp/arc/doc/docArchive/list`, { params: params }); };

//普通查询 条件之间and关系  
export const listDocArchivewwww = params => { return axios.get(`${base}/mdp.arc/doc/docArchive/listDocArchivewwww`, { params: params }); };

//模糊查询arc_doc_archive 条件之间or关系  
//export const listDocArchiveKey = params => { return axios.get(`${base}/mdp/arc/doc/docArchive/listKey`, { params: params }); };

//删除一条arc_doc_archive params={docNo:'文档编号 主键'}
export const delDocArchive = params => { return axios.post(`${base}/mdp/arc/doc/docArchive/del`,params); };

//批量删除arc_doc_archive  params=[{docNo:'文档编号 主键'}]
export const batchDelDocArchive = params => { return axios.post(`${base}/mdp/arc/doc/docArchive/batchDel`, params); };

//修改一条arc_doc_archive记录
export const editDocArchive = params => { return axios.post(`${base}/mdp/arc/doc/docArchive/edit`, params); };

//新增一条arc_doc_archive （政府发文）
export const addDocArchive = params => { return axios.post(`${base}/mdp/arc/doc/docArchive/add`, params); };

//新增一条arc_doc_archive (工作签报)
export const addWorkSign = params => {return axios.post(`${base}/mdp/arc/doc/docArchive/addWorkSign`, params);};

//新增一条arc_doc_archive (行政收文)
export const addRegistration = params => {return axios.post(`${base}/mdp/arc/doc/docArchive/addRegistration`, params);};


//查询最新八条数据 
export const selectEightDocArchive = params => { return axios.get(`${base}/mdp/arc/doc/docArchive/selectEightDocArchive`, { params: params }); };
